package ${package_service};
import ${package_pojo}.${Table};
import com.github.pagehelper.PageInfo;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;
/**
 * @ClassName: ${Table}Service
 * @description: ${Table}业务层接口
 * @author: 李东
 * @Date: 2020-7-20
 */
public interface ${Table}Service {

    /***
     * ${Table}多条件分页查询
     * @param ${table}
     * @param page
     * @param size
     * @return
     */
    PageInfo<${Table}> findPage(${Table} ${table}, int page, int size);

    /***
     * ${Table}分页查询
     * @param page
     * @param size
     * @return
     */
    PageInfo<${Table}> findPage(int page, int size);

    /***
     * ${Table}多条件搜索方法
     * @param ${table}
     * @return
     */
    List<${Table}> findList(${Table} ${table});

    /***
     * 删除${Table}
     * @param <#list primaryKeys as pr>${pr.name}<#if pr_has_next>,</#if></#list>
     */
    void delete(<#list primaryKeys as pr>${pr.type} ${pr.name}<#if pr_has_next>,</#if></#list>);

    /***
     * 修改${Table}数据
     * @param ${table}
     */
    void update(${Table} ${table});

    /***
     * 新增${Table}
     * @param ${table}
     */
    void add(${Table} ${table});

    /**
     * 根据ID查询${Table}
     * @param <#list primaryKeys as pr>${pr.name}<#if pr_has_next>,</#if></#list>
     * @return
     */
     ${Table} findById(<#list primaryKeys as pr>${pr.type} ${pr.name}<#if pr_has_next>,</#if></#list>);

    /***
     * 查询所有${Table}
     * @return
     */
    List<${Table}> findAll();
}
